package com.ypoak.xxl_job.test;


import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


@Component
public class Demo {

    private Logger log = LoggerFactory.getLogger(Demo.class);

    @XxlJob("testDemo")
    public void testDemo(){
        String jobParam = XxlJobHelper.getJobParam();
        System.out.println("接触到参数: "+ jobParam);

        log.info("定时任务执行啦");

    }
}
